import React, { Component, memo } from 'react'
const  ChildCom = memo(() => {
  console.log('child')
  return <div>child</div>
})
export class App extends Component {
 
  state = {
    name: '123'
  }
  componentDidMount() {
    console.log('组件挂载完毕')
  }
  // 组件挂载完毕
  render() {
    return (
      <>

        <div>{this.state.name}</div>
        <button onClick={() => {
          this.setState({
            name: '456'
          })
        }}>
          click
        </button>
        <ChildCom></ChildCom>
      </>

    )
  }


}

